<!--{template user/header}-->
<div style="height:30px;">&nbsp;</div>
<table class="list-table" border="0" cellpadding="0" cellspacing="0">
	<thead>
		<tr>
			<th colspan="8" class="lt-th" style="position:relative;">
				<strong>推荐列表</strong>
				<select id="listOrder" name="order" style="position:absolute;right:90px;top:2px;">
					<option value="default">排序方式</option>
					<option value="begin_time" {if $order == 'begin_time'}selected{/if}>推广开始时间</option>
					<option value="end_time" {if $order == 'end_time'}selected{/if}>推广结束时间</option>
					<option value="click" {if $order == 'click'}selected{/if}>用户点击量</option>
					<option value="price" {if $order == 'price'}selected{/if}>产生费用</option>
				</select>
				<select id="listType" name="type" style="position:absolute;right:1px;top:2px;">
					<option value="all">全部</option>
					<option value="now" {if $type == 'now'}selected{/if}>进行中</option>
					<option value="wait" {if $type == 'wait'}selected{/if}>未开始</option>
					<option value="expired" {if $type == 'expired'}selected{/if}>已结束</option>
				</select>
			</th>
		</tr>
	</thead>
	<tbody>
		<tr class="lt-title">
			<th class="first">名称</th>
			<th width="80">类型</th>
			<th width="100">开始时间</th>
			<th width="100">结束时间</th>
			<th width="80">点击</th>
			<th width="80">已支出费用</th>
			<th width="80">冻结费用</th>
			<th width="60" class="last">操作</th>
		</tr>
		<!--{loop $list $auction}-->
		<tr>
			<td class="lt-td tl first">
				<a href="{$auction[url]}" target="_blank">$auction[name]</a>
			</td>
			<td class="lt-td">
				<!--{if $auction['auction_type'] == 0}--> 
				广告位
				<!--{else}-->
				团购排序
				<!--{/if}-->
			</td>
			<td class="lt-td">
				$auction['validity_begin_time_format']
			</td>
			<td class="lt-td">
				$auction['validity_end_time_format']
			</td>
			<td class="lt-td">
				$auction['click']
			</td>
			<td class="lt-td">
				$auction['outlay_money_format']
			</td>
			<td class="lt-td">
				$auction['freeze_money_format']
			</td>
			<td class="lt-td last">
				<!--{if $auction['validity_begin_time'] <= $time && ($auction['validity_end_time'] == 0 || $auction['validity_end_time'] > $time)}-->
				<!--{if $auction['auction_type'] == 0}-->
				<a href="site.php?action=adv&aid=$auction['id']">管理</a>
				<!--{else}-->
				<a href="site.php?action=goods&aid=$auction['id']">管理</a>
				<!--{/if}-->
				<!--{if $auction['billing_type'] == 0}-->
				<br/><a href="site.php?action=pay&aid=$auction['id']">充值</a>
				<!--{/if}-->
				<br/>
				<!--{/if}-->
				<a href="site.php?action=statistic&aid=$auction['id']">统计</a>
			</td>
		</tr>
		<!--{/loop}-->
	</tbody>
	<!--{if $pager['page_count'] > 0}-->
	<tfoot>
		<tr>
			<td colspan="8" class="pages">
				<!--{subtemplate user/pages}-->
			</td>
		</tr>
	</tfoot>
	<!--{/if}-->
</table>
<script type="text/javascript">
var order = "{$order}";
var type = "{$type}";
var url = "site.php?action=auction&order=#order#&type=#type#";

jQuery(function($){
	$("#listOrder").change(function(){
		order = this.value;
		type = $("#listType").val();
		var fun = function(){
			location.href= url.replace("#order#",order).replace("#type#",type);
		}
		setTimeout(fun,1);
	});
	
	$("#listType").change(function(){
		type = this.value;
		order = $("#listOrder").val();
		
		var fun = function(){
			location.href= url.replace("#order#",order).replace("#type#",type);
		}
		setTimeout(fun,1);
	});
});
</script>
<!--{template user/footer}-->